package com.ssy.lingxi.system.controller;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.system.entity.LoginPattern;
import com.ssy.lingxi.system.service.LoginPatternService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
/**
 * @menu 基础设置-登录模式配置
 * @author wrc
 * @date 2020/7/20
 */
@Api(tags = "登录模式配置")
@RestController
public class LoginPatternController {

    @Autowired
    LoginPatternService loginPatternService;

    @ApiOperation(value = " 查询登录模式配置")
    @GetMapping("/login/pattern/list")
    public Wrapper<LoginPattern> loginPatternDeatils() {
        return loginPatternService.loginPatternDeatils();
    }


    @ApiOperation(value = " 修改登录模式配置")
    @PostMapping("/login/pattern/update")
    public Wrapper loginPatternUpdate(@RequestBody LoginPattern loginPattern) {
        return loginPatternService.loginPatternUpdate(loginPattern);
    }




}
